<!DOCTYPE html>
<html>
<head >
	<title>东家帮-选择支付方式</title>	
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
	<meta name="format-detection" content="telephone=no">
	<meta name="renderer" content="webkit">
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="alternate icon" type="image/png" href="amazeui/assets/i/favicon.png">
	<link rel="stylesheet" href="${base}/css/common.css"/>
	<link rel="stylesheet" href="${base}/css/index2.css"/>
	<base href="${base}/index/">
</head>
<body>
<div class="main order" id="choose">
	<div class="data">
		<div class="line" style="color:#999999;font-size: 21px;">选择支付方式</div>
	</div>
	<div class="data">
		<div class="line"><img src="${base}/images/weixin.png" width="24" height="24" /><span class="title">微信支付</span><input type="radio" name="mode" id="weixin" value="weixin" class="mode" checked="checked"></div>
	</div>
	<div class="data">
		<div class="line"><img src="${base}/images/balance.png" width="24" height="24"  /><span class="title">余额支付</span><span style="color:#FBA632;font-size: 20px;margin-left: 25%;">￥${money}元</span><input type="radio" name="mode" id="balance" value="balance" class="mode"></div>
	</div>
	
	<div class="data">
		<div class="line"><input type="button" id="submit"  onclick="add();" value="确定" class="btn" /></div>
	</div>
	
</div>
</body>
<script type="text/javascript" src="${base}/js/common.js"></script>
<script src="${base}/js/jquery1.10.2.min.js" ></script>
<script type="text/javascript">
function add(){
	var mode = $("input:radio[name='mode']:checked").val(); 
	if("weixin"==mode){
		window.location.href = "${base}/index/pay?orderid=${orderid}&mode="+mode;
	} else {
		$.ajax({ 
			url: "pay?orderid=${orderid}&mode="+mode, 
			type:"POST",
			data:{},
			success: function(data){
				alert(data);
				window.location.href = "${base}/index/orderList";		
		}});	
	}
		
	
}
</script>

orderid
</html>